module.exports = function(template, destpath) {
    // 使用 Mock
    var path = require('path');
    var fse = require('fs-extra');
    var Mock = require('mockjs')
    var data = Mock.mock(template);
    // 输出结果
    // console.log(JSON.stringify(data, null, 4))

    var basename = path.basename(__filename, ".js");

    fse.outputFileSync(path.join(__dirname, `${destpath}`), JSON.stringify(data, null, 4));
}